#include "hpi.h"
#include "ddr.h"
#include "inter_gpio.h" 

#include <csl.h>
#include <csl_hpi.h>
#include <stdio.h>

void main()
{
  CSL_Status stat;
  int error;
  CSL_GpioObj gpioObj1;

#if 0
  stat = ddr_init();
  if (stat == CSL_SOK) printf ("\n----DDR: Initializing complete----\n\n");
  else
    {
      printf ("\nDDR: Can't Initialize\n");
      return;
    }
#endif

  stat = hpi_init();
  if (stat == CSL_SOK) printf ("\n----HPI: Initializing complete----\n\n");
  else
    {
      printf ("\nHPI: Can't Initialize\n");
      return;
    }

#define HPI_WORK_ENABLED 0
#if HPI_WORK_ENABLED
  hpi_work();
#endif

#define GPIO_ENABLED 0
#if GPIO_ENABLED
  error = gpio_init(&gpioObj1);
  if (error == 0)	printf ("\n----GPIO: Initializing complete----\n\n");
  else
    {
      printf ("\nGPIO: Can't Initialize\n");
      return;
    }
  gpio_error_exit(&gpioObj1);
#endif
  return;
}
